﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Sys.Win.Demo
{
    public partial class Login : Sys.ClientForm
    {
        public Login()
        {
            InitializeComponent();
        }
        /// <summary>
        /// 登陆
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {

                if (Login("zfh424", "424414") == true)
                {
                    MessageBox.Show("登陆成功");
                }
                else
                {
                    MessageBox.Show("登陆失败");
                    return;
                }
                //Bill bl = null;
                //bl = Bill.GetEditableRoot(2);
                // Sys.Core.Security.PTPrincipal.Login("Dai","perfect");
               
                MessageBox.Show(Csla.ApplicationContext.User.Identity.Name);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
